package com.itlong.cloud.equip.app;

import com.itlong.cloud.POJO.DTO.app.engineer.AppEngineerDevicesDTO;
import com.itlong.cloud.POJO.DTO.app.engineer.AppEngineerThresholdDTO;
import com.itlong.cloud.POJO.VO.app.engineer.AppEngineerDevicesVO;
import com.itlong.cloud.POJO.VO.app.engineer.AppEngineerDoorDevicesVO;
import com.itlong.cloud.POJO.VO.app.engineer.AppEngineerFloorDevicesVO;
import com.itlong.cloud.POJO.VO.app.engineer.AppEngineerQrCodeDeviceVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <desc>
 *      APP设备信息业务处理暴露接口。
 * <desc/>
 *
 * @createDate 2017/11/8.
 */
@FeignClient(name = "equip-service")
public interface IAppEngineerDeviceServiceClient {

    /**
     * <desc>
     *      获取用户门禁设备列表
     * </desc>
     *
     * @param userId 用户Id
     * @param projectId 项目Id
     * @return
     * @author shengen.T
     * @createDate 2017/11/8
     */
    @RequestMapping(path = "/engineer/getDoorDevices",method = RequestMethod.POST)
    List<AppEngineerDoorDevicesVO> getDoorDevices(@RequestParam("userId")String userId, @RequestParam("projectId")String projectId)  throws Exception;

    /**
     * <desc>
     *      获取用户电梯设备列表
     * </desc>
     *
     * @param userId 用户Id
     * @param projectId 项目Id
     * @return
     * @author shengen.T
     * @createDate 2017/11/8
     */
    @RequestMapping(path = "/engineer/getFloorDevices",method = RequestMethod.POST)
    List<AppEngineerFloorDevicesVO> getFloorDevices(@RequestParam("userId")String userId, @RequestParam("projectId")String projectId )  throws Exception;

     /**
      * <desc>
      *      获取设备机号。
      * <desc/>
      *
      * @param devicesDTO 设备请求参数
      * @return
      * @author shengen.T
      * @createDate 2017/11/8
      */
    @RequestMapping(path = "/engineer/getDeviceId",method = RequestMethod.POST)
    List<AppEngineerDevicesVO> getDeviceId(@RequestBody AppEngineerDevicesDTO devicesDTO) throws Exception;

    /**
     * <desc>
     *      上传阈值。
     * <desc/>
     *
     * @param thresholdDTO 请求参数
     * @return
     * @author shengen.T
     * @createDate 2017/11/9
     */
    @RequestMapping(path = "/engineer/uploadData",method = RequestMethod.POST)
    Integer uploadData(@RequestBody AppEngineerThresholdDTO thresholdDTO) throws Exception;

    /**
     * <desc>
     *      获取二维码绑定的设备信息
     * </desc>
     *
     * @return 二维码绑定的设备信息
     * @author wangzhi
     * @createDate 2020/02/26
     */
    @RequestMapping(path = "/engineer/getDeviceByQrCode", method = RequestMethod.POST)
    AppEngineerQrCodeDeviceVO getDeviceByQrCode(@RequestParam("qrCodeContent") String qrCodeContent) throws Exception;

    /**
     * <desc>
     *      绑定设备与二维码
     * </desc>
     *
     * @return 受影响行数
     * @author wangzhi
     * @createDate 2020/02/26
     */
    @RequestMapping(path = "/engineer/bindingDeviceQrCode", method = RequestMethod.POST)
    Integer bindingDeviceQrCode(@RequestParam("qrCodeContent") String qrCodeContent,
                                @RequestParam("projectId") String projectId,
                                @RequestParam("deviceType") String deviceType,
                                @RequestParam(value = "sedanPlace", required = false) String sedanPlace,
                                @RequestParam("deviceUnique") String deviceUnique,
                                @RequestParam(value = "floor", required = false) String floor,
                                @RequestParam("userId") String userId) throws Exception;

    /**
     * <desc>
     *      获取电梯设备的楼层
     * </desc>
     *
     * @return 电梯设备的楼层列表
     * @author wangzhi
     * @createDate 2020/03/11
     */
    @RequestMapping(path = "/engineer/getDeviceFloors", method = RequestMethod.POST)
    List<String> getDeviceFloors(@RequestParam("projectId") String projectId, @RequestParam("deviceUnique") String deviceUnique) throws Exception;
}
